import java.util.Scanner;

public class Test_erjinzhi {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数：");
        int data = sc.nextInt();
        //奇数位
        System.out.println("奇数位：");
        for(int i = 0;i <= 30;i+=2)
            System.out.print(((data >> i) & 1) + " ");
        System.out.println("\n偶数位：");
        //偶数位
        for(int i = 1;i <= 31;i+=2)
            System.out.print(((data >> i) & 1) + " ");
    }
}
